import { createWebHashHistory, createRouter } from 'vue-router'
const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        { path: "/", redirect: "/index" },
        {
            path: "/index",
            component: () =>
                import ("../views/Index.vue")
        },
        {
            path: "/login",
            component: () =>
                import ("../views/Login.vue")
        },
        {
            path: "/detail/:id",
            component: () =>
                import ("../views/Detail.vue"),
            name: "detail"
        },
        {
            path: "/news/",
            component: () =>
                import ("../views/Newslist.vue")

        }
    ]
})

export default router